package com.suye.cloud; /**
 * Created by cheng.shuosheng on 2017/6/13.
 */

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@EnableDiscoveryClient
@RestController
@EnableHystrix
public class Service2Application {
    @GetMapping("/service2")
    public String service(){
        return "service2";
    }

    @GetMapping("/feignService/{name}")
    public String feignService(@PathVariable  String name){
        return "hello " + name;
    }

    public static void main(String[] args) {
        SpringApplication.run(Service2Application.class, args);
    }
}
